import http from "@/http";
import { GoodsListParm, StatusParm } from "./GoodsModel";

export const getGoodsListApi = (parm: GoodsListParm)=>{
    return http.get('/api/goods/list',parm)
}
/**
 * 获取求购商品列表
 * @param parm 
 * @returns 
 */
export const getWantedGoodsListApi = (parm: GoodsListParm)=>{
    return http.get('/api/goods/wanted/list',parm)
}

//上架下架
export const upanddownApi = (parm:StatusParm)=>{
    return http.post("/api/goods/upanddown",parm)
}
//推荐首页
export const setIndexApi = (parm:StatusParm)=>{
    return http.post("/api/goods/setIndex",parm)
}
//删除
export const deleteApi = (parm:StatusParm)=>{
    return http.post("/api/goods/delete",parm)
}